-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rand source in name #3070
Fix rand source in name #3070
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3070 +/- ##
=======================================
Coverage 78.44% 78.45%
=======================================
Files 191 191
Lines 8941 8938 -3
=======================================
- Hits 7014 7012 -2
+ Misses 1664 1663 -1
Partials 263 263 ☔ View full report in Codecov by Sentry. |
nameMu.Lock() | ||
for i := range suffix { | ||
suffix[i] = letterBytes[nameRand.Intn(len(letterBytes))] | ||
} | ||
nameMu.Unlock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor tweak - let's just do a defer unlock
nameMu.Lock() | |
for i := range suffix { | |
suffix[i] = letterBytes[nameRand.Intn(len(letterBytes))] | |
} | |
nameMu.Unlock() | |
nameMu.Lock() | |
defer nameMu.Unlock() | |
for i := range suffix { | |
suffix[i] = letterBytes[nameRand.Intn(len(letterBytes))] | |
} | |
actually let's get this merged - the change can be done in a follow up /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, skonto The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes